#ifndef _BBDATAMANAGER_H_
#define _BBDATAMANAGER_H_

#include "BBSingleton.h"
#include <map>

class BBDataModel;
class BBDataModelProxy;

class BBDataManager : public BBSingleton<BBDataManager>
{
public:
	BBDataModel* createDataObject(const char* xmlPath);
	BBDataModel* getDataObjByKey( char* key);
	void addDataObj(char* key,BBDataModel* obj);
	bool isHasDataObj(char* key);
	void removeDataObjByKey(char* key);
	BBDataModelProxy* getDataProxy (char* key);
	void purgeDataManager();
	void Clear();
private:
	BBDataManager(void);
	~BBDataManager(void);
	friend class BBSingleton<BBDataManager>;

private:
	std::map<char*,BBDataModel*> m_DataObjPool;
};

#endif